<template>
  <div class="main">
    <el-container style="height: 100vh">
      <el-aside    width="!isFold ? '120px' : '60px'" >
        <NavMenu :isFold="isFold" />
      </el-aside>
      <el-container>
        <el-header>
          <NavHeader @handleIsFold="handleFold" />
        </el-header>
        <el-main>
          <div class="main-container">
            <router-view></router-view>
          </div>
        </el-main>
        <!--         <el-footer>Footer</el-footer>-->
      </el-container>
    </el-container>
  </div>
</template>

<script>
import NavHeader from "@/components/nav-header";
import NavMenu from "@/components/nav-menu";
export default {
  name: "mains",
  components: { NavHeader, NavMenu },
  data() {
    return {
      isFold: false,
    };
  },
  methods: {
    handleFold(isFold) {
      this.isFold = isFold;
    },
  },
};
</script>

<style scoped>
.el-header,
.el-footer {
  background-color: #fff;
  color: #333;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  height: 100%;
}

.el-main {
  background-color: #f7f9fb;
  color: #333;
  padding: 0;
  overflow-y: auto;
  background: #f0f2f5;
}
.main-container {
  margin: 10px;
  /*height: 91vh;*/
  /*height: 855px;*/
  /*height: 100%;*/
  /*overflow: auto;*/
  /* background: #fff; */
  background-color: #f7f9fb;
}
</style>
